use Professor Favorability and Student Perceptions of Professor Ideology - Replication.dta
set seed 0210
*
/*note, we have a difference between the F204, S14,S15 experiments and the F15
experiment. We changed the know christi to know hillary (broken) question
so we will have to have an pol know question that 1) drops christi and clinton
questions, or one that uses clinton AND christi as interchangeable. Here i
have DROPPED both */
*below is some clean up
 {

*looks good f15
gen pid7 = .
replace pid7 = 7 if pid1_dem==1 //yes
replace pid7 = 6 if pid1_dem==2 //yes
replace pid7 = 5 if pid1_ind==2 //yes
replace pid7 = 4 if pid1_ind==3 //yes
replace pid7 = 3 if pid1_ind==1 //yes
replace pid7 = 2 if pid1_rep==2 //yes
replace pid7 = 1 if pid1_rep==1 //yes
rename pid7 pid7_dem
*looks good
gen prof_pid_dem =. //looks good 
replace prof_pid_dem = 7 if prof_dem==1
replace prof_pid_dem = 6 if prof_dem==2
replace prof_pid_dem = 5 if prof_d_r_i==1
replace prof_pid_dem = 4 if prof_d_r_i==3
replace prof_pid_dem = 3 if prof_d_r_i==2
replace prof_pid_dem = 5 if pro_d_r_i2==1
replace prof_pid_dem = 4 if pro_d_r_i2==3
replace prof_pid_dem = 3 if pro_d_r_i2==2
replace prof_pid_dem = 2 if prof_repub==2
replace prof_pid_dem = 1 if prof_repub==1
*
recode grade (1=5) (2=4) (4=2) (5=1)
label variable grade `"A=5, F = 1"'
*
rename stude_info year
*replace year = . if year==5 //5 is unsure or something else; dropped
*
recode qual_instr (7=1) (6=2) (5=3) (3=5) (2=6) (1=7)
label variable qual_instr `"quality instructor 1-7, 7 veing extremely good"'
*
rename inter_poli inter_pol
label variable inter_pol `"1=not at all itnerested politics, 5=extremely"'
label variable knowpol `"5=extrem knowle about pol; 1 = not at all knowledge"'
label variable follownews `"5=extreme reg and 1 = not at all reg"'
label variable like_prof `"1=very much dislike him, 5= very much like him"'
*
/*drop this entirely...the error makes it a 100% correct response
gen know1 = know_clin //clinton
replace know1 = 0 if know_clin~=2
replace know1 = 1 if know_clin~=0

dropping this one since it doesnt appear in the other rounds
gen know2 = knowchrist //christi
replace know2 = 0 if knowvp~=2
replace know2 = 1 if know2 ~=0

note that here i am assuming all missing are DK...this won't matter since they
will likely be listwise deleted anyway
*/
*fix a coding error
replace s16_dum = 0 if s16_dum>1
*
gen know3 = know_cj
replace know3 =0 if know_cj~=1
replace know3 = 1 if know3 ~=0
*
gen know4 = know_ger //3 correct
replace know4 = 0 if know4~=3
replace know4 = 1 if know4~=0
*
gen know5 = afghan_q //2 correct
replace know5 = 0 if know5~=2
replace know5=1 if know5~=0
*
gen know6 = speaker //1 correct
replace know6 = 0 if know6~=1
*
gen know7 = know_nato //1 correct
replace know7 = 0 if know7~=1
*
gen know8 = org_flag
replace know8 =0 if know8 ~=3
replace know8 =1 if know8~=0
*
gen avr_know = (know3+know4+know5+know6+know7+know8)/6
replace avr_know = . if pid7_dem==.
label variable avr_know `"6 pol knowledge ques; the average of the 6"'
*
gen pidXqual = pid7_dem*qual_instr
label var pidXqual `"student pid 1-7 dem * quality instructor"'
*
gen profidXpid = pid7_dem*prof_pid_dem 
label variable profidXpid `"student pid 1-7 * preceived prof pid 1-7"'
*
rename interest_i course_interest
label variable course_interest `"taking this course increased my interest in subject 1-5, 5=str agree"'
*
recode effort (4=1) (5=2) (6=3) (7=4) (8=5)
label variable effort `"i put more effort into thise course 1-5, 5= str agree"'
*
recode recommend  (6=1) (7=2) (8=3) (9=4) (10=5)
label variable recommend `"i would recommend this course to others 1-5, 5= str agree"'
*
recode expertise (6=1) (7=2) (8=3) (9=4) (10=5)
label variable expertise `"instructor was knowledgeable about material 1-5, 5= str agree"'
*
recode objective (6=1) (7=2) (8=3) (9=4) (10=5)
label variable objective `"instructor presented material in an objective & unbiased/manner; 5= strongly agree"'
*
recode grading (6=1) (7=2) (8=3) (9=4) (10=5)
*
recode prof_ideo (6=1) (7=2) (8=3) (9=4) (10=5)
label variable prof_ideo `"1= very conserv, 5 = vry liberal"'
*
recode class_ideo (6=1) (7=2) (8=3) (9=4) (10=5)
label variable class_ideo `"1= very conserv, 5 = vry liberal"'
*
recode self_ideo (6=1) (7=2) (8=3) (9=4) (10=5)
label variable self_ideo `"1= very conserv, 5 = vry liberal"'
label define ideology 1 "Very Conservative" 2 "Somewhat Conservatuve" 3 "Moderate" 4 "Somewhat Liberal" 5 "Very Liberal"
label values self_ideo ideology
label values prof_ideo ideology
*
recode pickatopic_1 (1=5) (2=4) (4=2) (5=1)
recode pickatopic_2 (1=5) (2=4) (4=2) (5=1)
recode pickatopic_3 (1=5) (2=4) (4=2) (5=1)
recode pickatopic_4 (1=5) (2=4) (4=2) (5=1)
recode pickatopic_5 (1=5) (2=4) (4=2) (5=1)
label variable pickatopic_1 `"genopol"'
label variable pickatopic_2 `"framing coutnerframing"'
label variable pickatopic_3 `"moral foundations"'
label variable pickatopic_4 `"field experiments"'
label variable pickatopic_5 `"pol adverts"'
*
rename v52 class_prior
recode class_prior (.=0) (2=0) //1=yes they have
*recode class_num (1=0) (2=1)
*
gen class_cluster = 0 if f14_dum==1 & ausderan_dum==1 & class_num==1 //jacob class 1?
replace class_cluster = 1 if f14_dum==1 & ausderan_dum==1 & class_num==2 //jacob class 2?

replace class_cluster = 2 if f14_dum==1 & ausderan_dum==0 & class_num==1 //f2014 american 008
replace class_cluster = 3 if f14_dum==1 & ausderan_dum==0 & class_num==2 //f2014 american 009 CORRECT

replace class_cluster = 4 if s14_dum==1 & ausderan_dum==0 & class_num==1 //s14 amer govt 007
replace class_cluster = 5 if s14_dum==1 & ausderan_dum==0 & class_num==2 //s14 amer govt 016;no ausderan this semester

replace class_cluster = 6 if s15_dum==1 & ausderan_dum==1 & class_num==0 //s2015 ausderan foreign policy 0/1
replace class_cluster = 7 if s15_dum==1 & ausderan_dum==1 & class_num==1 //s2015 ausderan foreign policy 0/1

replace class_cluster = 8 if s15_dum==1 & ausderan_dum==0 & class_num==1 //s2015 tx pol sex 009
replace class_cluster = 9 if s15_dum==1 & ausderan_dum==0 & class_num==2 //s2015 tx pol sex 010
replace class_cluster = 10 if s15_dum==1 & ausderan_dum==0 & class_num==3 //s2015 tx pol sex 011 CORRECT

replace class_cluster = 11 if f15_dum==1 & ausderan_dum==0 & class_num==1 //s2015 tx pol sec 01
replace class_cluster = 12 if f15_dum==1 & ausderan_dum==0 & class_num==2 //s2015 tx pol sec 02
replace class_cluster = 13 if f15_dum==1 & ausderan_dum==0 & class_num==3 //s2015 tx pol sec 03 CORRECT

replace class_cluster = 14 if f15_dum==1 & ausderan_dum==0 & class_num==1 //tx pol 01 f15
replace class_cluster = 15 if f15_dum==1 & ausderan_dum==0 & class_num==2 //tx pol 02 f15
replace class_cluster = 16 if f15_dum==1 & ausderan_dum==0 & class_num==3 //tx pol 03 f15
replace class_cluster = 17 if f15_dum==1 & ausderan_dum==0 & class_num==4 //con law 1 f15
replace class_cluster = 18 if f15_dum==1 & ausderan_dum==1 //jacob f15
*
replace class_cluster = 19 if s16_dum==1 & ausderan_dum==0 & class_num==1 //s2016 american pol sec 400 
replace class_cluster = 20 if s16_dum==1 & ausderan_dum==0 & class_num==2 //s2016 american pol sec 007
replace class_cluster = 21 if s16_dum==1 & ausderan_dum==0 & class_num==3 //s2016 american pol sec 008
*
}
*
*below is more clean up and variable generation
qui {
rename ausderan_dum profa_dum //for submission to journal to remove name
label variable profa_dum `"dummy variable for professor A, 0 = B"'
*as per the paper, we need a measure of congruence
gen ideolo_congruence = abs(prof_ideo-self_ideo)
label variable ideolo_congruence `"abs difference: prof ideolo - student ideolo; 0=congruent, 4=max incongruence"'
*also worth looking at party congruence
gen party_congruence = abs(prof_pid_dem-pid7_dem)
label variable party_congruence `"abs difference: prof pty - student pty; 0=congruent, 6=max incongruence"'
*some interactions
gen self_ideoXqual_instr = self_ideo*qual_instr
label variable self_ideoXqual `"student ideology Liberal (1-5)*quality of instructor (1-7)"'
gen stu_PIDXquality = qual_instr*pid7_dem
label variable stu_PIDXquality `"student party ID Dem (1-7)*quality of instructor (1-7)"'
gen ideoXlikeprof = self_ideo*like_prof //student ideolo * prof favorability
label variable ideoXlikeprof `"student ideology Liberal (1-5)*how much you like the prof (1-5)"'
gen pidXlike = pid7_dem*like_prof
label variable pidXlike `"student party ID Dem (1-7)*how much you like the prof (1-5)"'
gen pidXrecommend = pid7_dem*recommend
label variable pidXrecommend `"student party ID Dem (1-7)*would you recommend this prof? (1-5)"'
gen ideoXrecommend = self_ideo*recommend
label variable ideoXrecommend `"student ideolo Liberal (1-5)*recomment this prof ?(1-5)"'
}
*************************************************
*Model 1: simple model...student ideology predicts prof ideology?
reg  prof_ideo self_ideo profa_dum if class_prior==0, cluster(class_cluster) 
est sto A //store estimates
*
*model 2* recommend, quality of instruction, and like professor, WITHOUT interactions
*recommend
reg  prof_ideo self_ideo recommend profa_dum ///
     if class_prior==0, cluster(class_cluster) //self ideolo is sig and poz
*quality
reg  prof_ideo self_ideo qual_instr profa_dum ///
     if class_prior==0, cluster(class_cluster) //self is sig and +
*like professor
reg prof_ideo self_ideo like_prof profa_dum ///
	if class_prior==0, cluster(class_cluster) //sig and + for self
*
*model 3* recommend, quality of instruction, and like professor, WITH interactions
	*recommend
reg prof_ideo self_ideo recommend ideoXrecommend profa_dum ///
	if class_prior==0, cluster(class_cluster) //recommend is sig neg; interact sig +
est sto B
	*quality
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum ///
	if class_prior==0, cluster(class_cluster) //self sig and neg; interact sig and +
est sto C	
	*like prof
reg prof_ideo self_ideo like_prof ideoXlikeprof profa_dum ///
	if class_prior==0, cluster(class_cluster) //self & like_prof sig & neg; interact sig and +
est sto D
*below i am using the estout package -- "net search estout" will locate it
estout A B C D, style(tab) cells(b(star fmt(%9.3f))  se(par fmt(%9.3f))) ///
stats(N r2) starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001) delimiter(;)
****************************
* 	which contructs are similar measures?
*****************************
*let's look at some Cronbach's Alphas
alpha qual_instr like_prof //.6315 here
alpha qual_instr recommend //.6777 here
alpha qual_instr expertise //.288
alpha qual_instr objective //.3949
*
alpha like_prof recommend //.6025 here
alpha like_prof expertise //.2235
alpha like_prof objective //.4527
*
alpha expertise recommend //.312
alpha expertise objective //.376
*
alpha qual_instr like_prof recommend //.7423, yeah these seem to be a similar construct
*
*factor analysis
factor qual_instr like_prof recommend, pcf
rotate //they are all equally defining factor 1
predict factor1 //equal predictive power

	*
	*
	* PREDICTED PROBABILITY FIGURES
	*
	*
	*
/*note, i have also run this without the Spring 2016 data AND dropping
		minors (under 18) and results look pretty much the same regardless. any
		deviations are noted in parthesis in the comments
note: You will need the Clarify package (net search clarify) */
set seed 0210
qui estsimp reg prof_ideo self_ideo like_prof ideoXlikeprof profa_dum if class_prior==0, cluster(class_cluster) sims(10000)
setx mean
simqi //3.17, slightly liberal...more moderate, ok
setx self_ideo min like_prof min ideoXlikeprof 2 //conserv + dislike prof
simqi //3.54, slight liberal, SO SO (3.86, no minors)
setx self_ideo 5 like_prof 1 ideoXlikeprof 5 //liberal, dislike prof
simqi //2.81, slight conserv...kinda yep (1.98 without s2016)
setx self_ideo 1 like_prof 5 ideoXlikeprof 5 //conserv, like prof
simqi //2.26 conserv, YEP
setx self_ideo max like_prof max ideoXlikeprof 25 //liberal + like prof
simqi //4.04, liberal, YEP
*oddly this doesnt seem to hold for party, however
drop b*

*MGFX for quality instructor
/*note, i have also run this without the Spring 2016 data AND dropping
		minors (under 18) and results look pretty much the same regardless */
qui estsimp reg  prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum ///
     if class_prior==0, cluster(class_cluster) //
sum  self_ideo qual_instr self_ideoXqual_instr profa_dum
setx self_ideo mean qual_instr mean self_ideoXqual mean profa_dum mean //avr
simqi //3.2, so moderate...okay
setx self_ideo min qual_instr min self_ideoXqual 2 profa_dum mean //conserv + low qual
simqi //3.07 moderate...wrong
setx self_ideo max qual_instr min self_ideoXqual 10 profa_dum mean //liberal + low qual
simqi // 2.588 so slight conserv...correct, weakly
setx self_ideo min qual_instr max self_ideoXqual 7 profa_dum mean //conserv + high qual
simqi // 2.72 slight lconserv...correct, weakly
setx self_ideo max qual_instr max self_ideoXqual 35 profa_dum mean //conserv + high qual
simqi //3.859 slight liberal...correct, weakly
drop b*
	
*MGFX for recommend.
/*note, i have re-run with dropped minors--looks the same. also with dropping @2016, 
	and it also looks pretty much the same*/
qui estsimp reg  prof_ideo self_ideo recommend ideoXrecommend profa_dum ///
     if class_prior==0, cluster(class_cluster) sims(10000) //recomm neg and sig; interaction is poz and sig
sum  self_ideo recommend ideoXrecommend profa_dum
setx self_ideo mean recommend mean ideoXrecommend 12.3732 profa_dum mean //avr
simqi //3.18, so moderate...okay
setx self_ideo min recommend min ideoXrecommend 1 profa_dum mean //conserv + no recommend
simqi //3.79 semi-liberal, slight YEP
setx self_ideo max recommend min ideoXrecommend 5 profa_dum mean //liberal + no recommend
simqi //2.53, semi-conserv, slight YEP
setx self_ideo min recommend max ideoXrecommend 5 profa_dum mean //conserv + recommend
simqi // 2.49, semi-conserv, slight YEP
setx self_ideo max recommend max ideoXrecommend 25 profa_dum mean //conserv + recommend
simqi //3.88, liberal, YEP
drop b*

****************


*class Party identification 
hist pid7_dem, bin(7) freq start(1) normal addlabel
hist pid7_dem, bin(7) percent  start(1) normal  addlabel //
hist pid7_dem if class_num==0, bin(7) percent  start(1) normal  addlabel //sec 08
hist pid7_dem if class_num==1, bin(7) percent  start(1) normal  addlabel //sec 09
*class ideolo
hist self_ideo, bin(5) percent  start(1) normal  addlabel //
hist class_ideo, bin(5) percent  start(1) normal  addlabel //
*prof id
sum prof_pid_dem
hist prof_pid_dem, bin(7) percent start(1) normal addlabel
*prof ideo
hist prof_ideo, bin(5) percent start(1) normal addlabel
*prof quality
hist qual_instr, bin(7) freq normal //mean 
*class know
hist avr_know, percent normal addlabel

**********
*class differences?
pwcorr class_num avr_know, sig //ns
pwcorr class_num grade, sig //ns
pwcorr class_num qual_instr, sig //sig, but tiny (.11)
pwcorr class_num pid7_dem, sig //sig but also tiny (.17)
pwcorr class_num prof_pid_dem, sig //sig but tiny (.12)


****************************
*		MISC
****************************
*
*
*
*

*
**MGFX for prof expertise and ideology
/* these results seem a bit off, this may not be tapping quality*/
gen ideoXexpert = expertise*self_ideo
reg prof_ideo self_ideo expertise ideoXexpert profa_dum if class_prior==0, ///
	cluster(class_cluster) //yes, all 3, but interact is neg
qui estsimp reg prof_ideo self_ideo expertise ideoXexpert profa_dum  ///
	if class_prior==0, cluster(class_cluster) sims(10000)
sum self_ideo expertise ideoXexpert profa_dum
setx self_ideo mean  expertise mean  ideoXexpert 14.33 profa_dum mean  //means
simqi //3.17, pretty moderate
setx self_ideo min expertise min ideoXexpert 1 //conserv + no expert
simqi // 1.81, odd...they said conserv
setx self_ideo max expertise min ideoXexpert 5 //liberal +no expert
simqi //4.25, odd, they said liberal
setx self_ideo min expertise max ideoXexpert 5 //conserv + expert
simqi //2.785, moderate, sligth conserv
setx self_ideo max expertise max ideoXexpert 25 //liberal + expert
simqi //3.59 pretty liberal...
drop b*
*
*
*********************************************
*	ROBUSTNESS and appendix
*********************************************

*considering the models via ordered probit
	*base model
reg  prof_ideo self_ideo profa_dum if class_prior==0, cluster(class_cluster) 
oprobit  prof_ideo self_ideo profa_dum if class_prior==0, cluster(class_cluster) 
	est sto E
	*recommend
reg prof_ideo self_ideo recommend ideoXrecommend profa_dum ///
	if class_prior==0, cluster(class_cluster) //recommend is sig neg; interact sig +
oprobit prof_ideo self_ideo recommend ideoXrecommend profa_dum ///
	if class_prior==0, cluster(class_cluster) //recommend is sig neg; interact sig +
	est sto F
	*quality
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum ///
	if class_prior==0, cluster(class_cluster) //self sig and neg; interact sig and +
oprobit prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum ///
	if class_prior==0, cluster(class_cluster) //self sig and neg; interact sig and +
est sto G
	*like prof
reg prof_ideo self_ideo like_prof ideoXlikeprof profa_dum ///
	if class_prior==0, cluster(class_cluster) //self & like_prof sig & neg; interact sig and +
oprobit prof_ideo self_ideo like_prof ideoXlikeprof profa_dum ///
	if class_prior==0, cluster(class_cluster) //self & like_prof sig & neg; interact sig and +
est sto H
estout E F G H, style(tab) cells(b(star fmt(%9.3f))  se(par fmt(%9.3f))) ///
stats(ll N r2_p) starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001) delimiter(;)
*
*endogeneity?
{
*original:
reg prof_ideo self_ideo recommend ideoXrecommend profa_dum ///
	if class_prior==0, cluster(class_cluster) //recommend is sig neg; interact sig +
*course interest
pwcorr course_interest prof_ideo self_ideo recommend ///
ideoXrecommend profa_dum, sig //PERFECT, r=.48 and sig, but not for prof ideo
*corr with prof ideol is not sig, but is sig (r=0.4821) with recommend
*let's reg and test
reg recommend prof_ideo self_ideo profa_dum course_interest ideoXrecommend ///
	if class_prior==0, cluster(class_cluster) //sig, good
reg prof_ideo recommend  self_ideo profa_dum course_interest ideoXrecommend ///
	if class_prior==0, cluster(class_cluster) //good, interest isnt sig
*
ivregress 2sls prof_ideo (recommend = course_interest) self_ideo ideoXrecommend ///
profa_dum if class_prior==0, cluster(class_cluster) first
estat endogenous //p=0.23; the null is that interest is exogeneous; 
*we have to accept the null...they ARE exogeneous
*
*let's check the strength of the instrument 
ivregress 2sls prof_ideo (recommend = course_interest) self_ideo ///
ideoXrecommend profa_dum if class_prior==0, cluster(class_cluster) first
est sto twos
estat firststage, forcenonrobust //F=12.6, which is greater than 10, so it is strong
estout twos, style(tab) cells(b(star fmt(%9.3f))  se(par fmt(%9.3f))) ///
stats(N r2) starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001) delimiter(;)
}
************************
*	political knowledge
***********************************
sum avr_know if class_prior==0 & prof_ideo~=.
*simply adding knowledge 
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum avr_know ///
	if class_prior==0, cluster(class_cluster) //knowl. is sig and poz; interaction remains sig
*knowledge * self (student) ideolo
gen selfXknow = self_ideo*avr_know //self ideo * avr know
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum avr_know selfXknow ///
	if class_prior==0, cluster(class_cluster) //know and selfXknow NS...interact remains sig
*knowledge * quality instr
gen qualityXknow = qual_instr*avr_know //self ideo * avr know
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum avr_know qualityXknow ///
	if class_prior==0, cluster(class_cluster) //quality now sig & -; inter remains sig; quality*know inter sig and +
*know * quality AND know * self ideo
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum avr_know qualityXknow selfXknow ///
	if class_prior==0, cluster(class_cluster) //
*
*	
*three way interaction: know*quality + know*self_ideo + know*self*qual
gen knowXselfXqual = self_ideo*qual_instr*avr_know
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr profa_dum avr_know qualityXknow selfXknow knowXselfXqual ///
	if class_prior==0, cluster(class_cluster) //none are significant!
	est sto knowqual
*
*
*let's try threeway with recommend
gen recXknow = recommend*avr_know
gen knowXselfXrec = recommend*avr_know*self_ideo
reg prof_ideo self_ideo recommend ideoXrecommend profa_dum selfXknow recXknow knowXselfXrec ///
	if class_prior==0, cluster(class_cluster) //recommend is sig neg, that is all
	est sto knowrec
*
*
*now with like professor
gen likeXknow = like_prof*avr_know
gen knowXselfXlike = like_prof*avr_know*self_ideo
reg prof_ideo self_ideo recommend ideoXrecommend profa_dum selfXknow likeXknow knowXselfXlike ///
	if class_prior==0, cluster(class_cluster) //recommend is sig neg...
	*like prof interactio is sig and poz' 3-way is not
	est sto knowlike
***
estout knowqual knowrec knowlike, style(tab) cells(b(star fmt(%9.3f))  se(par fmt(%9.3f))) ///
stats(N r2) starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001) delimiter(;)
****************************
*disaggregating by professor
	*recommend
reg prof_ideo self_ideo recommend ideoXrecommend  ///
	if class_prior==0 & profa_dum==1, cluster(class_cluster) //interact isnt sig, small n
est sto H_a
reg prof_ideo self_ideo recommend ideoXrecommend  ///
	if class_prior==0 & profa_dum==0, cluster(class_cluster) //sig
est sto H_b
	*quality
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr  ///
	if class_prior==0 & profa_dum==1, cluster(class_cluster) //NS
est sto I_a	
reg prof_ideo self_ideo qual_instr self_ideoXqual_instr  ///
	if class_prior==0 & profa_dum==0, cluster(class_cluster) //NS
est sto I_b
	*like prof
reg prof_ideo self_ideo like_prof ideoXlikeprof profa_dum ///
	if class_prior==0, cluster(class_cluster) //self & like_prof sig & neg; interact sig and +
est sto D
estout , style(tab) cells(b(star fmt(%9.3f))  se(par fmt(%9.3f))) ///
stats(N r2) starlevels(+ 0.10 * 0.05 ** 0.01 *** 0.001) delimiter(;)
